#ifndef PIECE_H_
#define PIECE_H_

#include "GraphicalComposite.h"
#include "Position.h"
#include "AddPieceNetworkEvent.h"

class Piece : public GraphicalComposite
{
public:
    Piece(long id, const Position& position, const Color& color);
    virtual ~Piece();

    static Piece* create(const Event& addPieceUserEvent);
    void handleAddBlockToPieceEvent(long pieceId, long blockId, const Position& position);
    void handleUpdatePieceEvent(long pieceId, const Position& position);

protected:
    void handleEvent(const Event& event);
    void addBlock(long blockId, const Position& position);

    Color color;

private:
};

#endif
